M=require("ming_node");
/**
 "dependencies": {
    "@serialport/parser-readline": "^10.3.0",
    "serialport": "^10.4.0"
  }
 */
const { SerialPort } = require('serialport')
const { ReadlineParser } = require('@serialport/parser-readline')
const MingSericalRunCode=require("./MingSericalRunCode.js");

/**
 * 按行分包
 */
class MingSericalReadLineRunCode extends MingSericalRunCode{


    constructor({com,brand,messageEvent,isNodeExecute}) {
        super({com,brand,messageEvent,isNodeExecute});
        this.parser = this.sp.pipe(new ReadlineParser({ delimiter: '\n' }))
        this.init();
    }


}

module.exports = MingSericalReadLineRunCode;